﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ERPEF.Model
{
    public class pro_warehousing
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int pw_id {  get; set; } //生产入库编号

        public string pw_code { get;set; }//客户姓名

        public string pw_client_property { get; set; }//客户属性

        public string pw_number { get; set; }//生产订单编号

        public DateTime pw_storage_date { get; set; }//入库日期

        public string pw_operators { get; set; }//操作人员

        public string pw_types { get; set; }//产品种类

        public bool AuditStatus { get; set; }//审核状态 ture fasle

        public string pw_state { get; set; }//生产状态 0，1，2

       public char pw_warehouse { get; set; }//订单入库状态

       public bool IsDeleted { get; set; } = false; //逻辑删除



        public List<pro_warehousing_from> pro_warehousing_from { get; set; } // 从表数据

        public virtual string ToString()
        {

            if (pro_warehousing_from != null && pro_warehousing_from.Count > 0)
            {
                return pro_warehousing_from.Count + " - " + pro_warehousing_from[0].wf_sing_model;
            }
            else
            {
                return base.ToString(); // 或返回其他默认值  
            }
        }
    }
}
